﻿<ResourceDictionary
	xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
	xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
	xmlns:System="clr-namespace:System;assembly=mscorlib"
	xmlns:vsm="clr-namespace:System.Windows;assembly=System.Windows" 
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
	mc:Ignorable="d" 
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:controls="clr-namespace:nRoute.Samples.OfficerXcel.Controls;assembly=OfficerXcel.Infrastructure">
	
    <!-- IMAGE BUTTON, with a settable image -->			
    <Style x:Key="ToolbarOfficeImageButtonStyle" TargetType="controls:ImageButton">
		<Setter Property="Background" Value="#FF1F3B53"/>
		<Setter Property="Foreground" Value="#FF000000"/>
		<Setter Property="Padding" Value="3"/>
		<Setter Property="BorderThickness" Value="1"/>
		<Setter Property="BorderBrush">
			<Setter.Value>
				<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
					<GradientStop Color="#FFA3AEB9" Offset="0"/>
					<GradientStop Color="#FF8399A9" Offset="0.375"/>
					<GradientStop Color="#FF718597" Offset="0.375"/>
					<GradientStop Color="#FF617584" Offset="1"/>
				</LinearGradientBrush>
			</Setter.Value>
		</Setter>
		<Setter Property="Template">
			<Setter.Value>
				<ControlTemplate TargetType="controls:ImageButton">
					<Grid Cursor="Hand" MinWidth="20" MinHeight="20" Margin="2">
						<VisualStateManager.VisualStateGroups>
							<VisualStateGroup x:Name="CommonStates">
								<VisualStateGroup.Transitions>
									<VisualTransition GeneratedDuration="00:00:00.1000000"/>
								</VisualStateGroup.Transitions>
								<VisualState x:Name="Normal"/>
								<VisualState x:Name="MouseOver">
									<Storyboard>
										<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="Background" Storyboard.TargetProperty="(UIElement.Opacity)">
											<EasingDoubleKeyFrame KeyTime="00:00:00" Value="1"/>
										</DoubleAnimationUsingKeyFrames>
									</Storyboard>
								</VisualState>
								<VisualState x:Name="Pressed">
									<Storyboard>
										<ColorAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="Background" Storyboard.TargetProperty="(Border.Background).(GradientBrush.GradientStops)[2].(GradientStop.Color)">
											<EasingColorKeyFrame KeyTime="00:00:00" Value="#FFFFCE41"/>
										</ColorAnimationUsingKeyFrames>
										<ColorAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="Background" Storyboard.TargetProperty="(Border.Background).(GradientBrush.GradientStops)[1].(GradientStop.Color)">
											<EasingColorKeyFrame KeyTime="00:00:00" Value="#FFFFB951"/>
										</ColorAnimationUsingKeyFrames>
										<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="Background" Storyboard.TargetProperty="(Border.Background).(GradientBrush.GradientStops)[2].(GradientStop.Offset)">
											<EasingDoubleKeyFrame KeyTime="00:00:00" Value="0.198"/>
										</DoubleAnimationUsingKeyFrames>
										<ColorAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="Background" Storyboard.TargetProperty="(Border.Background).(GradientBrush.GradientStops)[0].(GradientStop.Color)">
											<EasingColorKeyFrame KeyTime="00:00:00" Value="#FFFBCA28"/>
										</ColorAnimationUsingKeyFrames>
										<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="Background" Storyboard.TargetProperty="(Border.Background).(GradientBrush.GradientStops)[1].(GradientStop.Offset)">
											<EasingDoubleKeyFrame KeyTime="00:00:00" Value="0.932"/>
										</DoubleAnimationUsingKeyFrames>
										<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="Background" Storyboard.TargetProperty="(UIElement.Opacity)">
											<EasingDoubleKeyFrame KeyTime="00:00:00" Value="1"/>
										</DoubleAnimationUsingKeyFrames>
										<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="Background" Storyboard.TargetProperty="(Border.Background).(GradientBrush.GradientStops)[0].(GradientStop.Offset)">
											<EasingDoubleKeyFrame KeyTime="00:00:00" Value="0.255"/>
										</DoubleAnimationUsingKeyFrames>
									</Storyboard>
								</VisualState>
								<VisualState x:Name="Disabled">
									<Storyboard>
										<DoubleAnimationUsingKeyFrames Storyboard.TargetName="DisabledVisualElement" 
											Storyboard.TargetProperty="Opacity">
											<SplineDoubleKeyFrame KeyTime="0" Value=".55"/>
										</DoubleAnimationUsingKeyFrames>
									</Storyboard>
								</VisualState>
							</VisualStateGroup>
							<VisualStateGroup x:Name="FocusStates">
								<VisualState x:Name="Focused">
									<Storyboard>
										<DoubleAnimationUsingKeyFrames Storyboard.TargetName="FocusVisualElement" 
                                                                       Storyboard.TargetProperty="Opacity">
											<SplineDoubleKeyFrame KeyTime="0" Value="1"/>
										</DoubleAnimationUsingKeyFrames>
									</Storyboard>
								</VisualState>
								<VisualState x:Name="Unfocused"/>
							</VisualStateGroup>
						</VisualStateManager.VisualStateGroups>
						<Border x:Name="Background" BorderThickness="{TemplateBinding BorderThickness}" Opacity="0" BorderBrush="#FFFEBA4E">
							<Border.Background>
								 <!--<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
									<GradientStop Color="#FFF5B06F"/>
									<GradientStop Color="#FFF8D168" Offset="1"/>
									<GradientStop Color="#FFE19154" Offset="0.341"/>
									<GradientStop Color="#FFE2782A" Offset="0.374"/>
									<GradientStop Color="#FFF1B454" Offset="0.943"/>
								</LinearGradientBrush>-->
								<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                    <GradientStop Color="#FFFFDF76" Offset="0.057"/>
                                    <GradientStop Color="#FFFCDC84" Offset="0.936"/>
                                    <GradientStop Color="#FFFFDD7C" Offset="0.142"/>
                                </LinearGradientBrush>
							</Border.Background>
						</Border>
						<ContentPresenter x:Name="contentPresenter" Content="{TemplateBinding Content}" 
                                    ContentTemplate="{TemplateBinding ContentTemplate}" HorizontalAlignment="Center"
                                    VerticalAlignment="Bottom" Margin="0,0,0,6"/>
						<Rectangle x:Name="DisabledVisualElement" Fill="#FFFFFFFF" RadiusX="3" RadiusY="3" 
                                   IsHitTestVisible="false" Opacity="0"/>
						<Rectangle x:Name="FocusVisualElement" StrokeThickness="0.5" RadiusX="2" 
                                   RadiusY="2" Margin="2" IsHitTestVisible="false" Opacity="0" 
                                   Stroke="#FF868686" StrokeDashArray="3"/>
						<Image Source="{TemplateBinding ImageSource}" MaxWidth="32" MaxHeight="32" VerticalAlignment="Top" 
                               Margin="0,6,0,0" Stretch="None" />
					</Grid>
				</ControlTemplate>
			</Setter.Value>
		</Setter>
	</Style>

    <!-- COMBO BOX, plain style -->
    <Style x:Key="ToolbarComboBoxStyle" TargetType="ComboBox">
    	<Setter Property="Padding" Value="6,2,25,2"/>
    	<Setter Property="Background" Value="#FF1F3B53"/>
    	<Setter Property="HorizontalContentAlignment" Value="Left"/>
    	<Setter Property="BorderThickness" Value="1"/>
    	<Setter Property="TabNavigation" Value="Once"/>
    	<Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Auto"/>
    	<Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto"/>
    	<Setter Property="BorderBrush">
    		<Setter.Value>
    			<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
    				<GradientStop Color="#FFA3AEB9" Offset="0"/>
    				<GradientStop Color="#FF8399A9" Offset="0.375"/>
    				<GradientStop Color="#FF718597" Offset="0.375"/>
    				<GradientStop Color="#FF617584" Offset="1"/>
    			</LinearGradientBrush>
    		</Setter.Value>
    	</Setter>
    	<Setter Property="Template">
    		<Setter.Value>
    			<ControlTemplate TargetType="ComboBox">
    				<Grid>
    					<Grid.Resources>
    						<Style x:Name="comboToggleStyle" TargetType="ToggleButton">
    							<Setter Property="Foreground" Value="#FF333333"/>
    							<Setter Property="Background" Value="#FF1F3B53"/>
    							<Setter Property="BorderBrush">
    								<Setter.Value>
    									<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
    										<GradientStop Color="#FFA3AEB9" Offset="0"/>
    										<GradientStop Color="#FF8399A9" Offset="0.375"/>
    										<GradientStop Color="#FF718597" Offset="0.375"/>
    										<GradientStop Color="#FF617584" Offset="1"/>
    									</LinearGradientBrush>
    								</Setter.Value>
    							</Setter>
    							<Setter Property="BorderThickness" Value="1"/>
    							<Setter Property="Padding" Value="3"/>
    							<Setter Property="Template">
    								<Setter.Value>
    									<ControlTemplate TargetType="ToggleButton">
    										<Grid>
    											<VisualStateManager.VisualStateGroups>
    												<VisualStateGroup x:Name="CommonStates">
    													<VisualState x:Name="Normal"/>
    													<VisualState x:Name="MouseOver">
    														<Storyboard>
    															<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="Background" Storyboard.TargetProperty="(UIElement.Opacity)">
    																<EasingDoubleKeyFrame KeyTime="00:00:00" Value="1"/>
    															</DoubleAnimationUsingKeyFrames>
    															<ColorAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="Highlight" Storyboard.TargetProperty="(Shape.Stroke).(SolidColorBrush.Color)">
    																<EasingColorKeyFrame KeyTime="00:00:00" Value="#FF6DBDD1"/>
    															</ColorAnimationUsingKeyFrames>
    														</Storyboard>
    													</VisualState>
    													<VisualState x:Name="Pressed">
    														<Storyboard>
    															<DoubleAnimationUsingKeyFrames Storyboard.TargetName="Highlight" Storyboard.TargetProperty="(UIElement.Opacity)">
    																<SplineDoubleKeyFrame KeyTime="0" Value="1"/>
    															</DoubleAnimationUsingKeyFrames>
    															<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="Background" Storyboard.TargetProperty="(UIElement.Opacity)">
    																<EasingDoubleKeyFrame KeyTime="00:00:00" Value="1"/>
    															</DoubleAnimationUsingKeyFrames>
    														</Storyboard>
    													</VisualState>
    													<VisualState x:Name="Disabled">
    														<Storyboard>
    															<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="contentPresenter" Storyboard.TargetProperty="(UIElement.Opacity)">
    																<EasingDoubleKeyFrame KeyTime="00:00:00" Value="0.5"/>
    															</DoubleAnimationUsingKeyFrames>
    														</Storyboard>
    													</VisualState>
    												</VisualStateGroup>
    												<VisualStateGroup x:Name="CheckStates">
    													<VisualState x:Name="Checked">
    														<Storyboard>
    															<DoubleAnimationUsingKeyFrames Storyboard.TargetName="Highlight" Storyboard.TargetProperty="(UIElement.Opacity)">
    																<SplineDoubleKeyFrame KeyTime="0" Value="1"/>
    															</DoubleAnimationUsingKeyFrames>
    															<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="Background" Storyboard.TargetProperty="(UIElement.Opacity)">
    																<EasingDoubleKeyFrame KeyTime="00:00:00" Value="1"/>
    															</DoubleAnimationUsingKeyFrames>
    															<ColorAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="Highlight" Storyboard.TargetProperty="(Shape.Stroke).(SolidColorBrush.Color)">
    																<EasingColorKeyFrame KeyTime="00:00:00" Value="#FF6DBDD1"/>
    															</ColorAnimationUsingKeyFrames>
    															<ColorAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="Highlight" Storyboard.TargetProperty="(Shape.Fill).(SolidColorBrush.Color)">
    																<EasingColorKeyFrame KeyTime="00:00:00" Value="White"/>
    															</ColorAnimationUsingKeyFrames>
    														</Storyboard>
    													</VisualState>
    													<VisualState x:Name="Unchecked"/>
    													<VisualState x:Name="Indeterminate"/>
    												</VisualStateGroup>
    												<VisualStateGroup x:Name="FocusStates">
    													<VisualState x:Name="Focused">
    														<Storyboard>
    															<ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetName="FocusVisualElement" Storyboard.TargetProperty="Visibility">
    																<DiscreteObjectKeyFrame KeyTime="0">
    																	<DiscreteObjectKeyFrame.Value>
    																		<Visibility>Visible</Visibility>
    																	</DiscreteObjectKeyFrame.Value>
    																</DiscreteObjectKeyFrame>
    															</ObjectAnimationUsingKeyFrames>
    														</Storyboard>
    													</VisualState>
    													<VisualState x:Name="Unfocused"/>
    												</VisualStateGroup>
    											</VisualStateManager.VisualStateGroups>
    											<Rectangle x:Name="Background" Opacity="0" StrokeThickness="0" Margin="1" Fill="White"/>
    											<Rectangle x:Name="Highlight" Stroke="#FFE0D8D8" StrokeThickness="1" Margin="{TemplateBinding BorderThickness}" IsHitTestVisible="false" Fill="Transparent"/>
    											<ContentPresenter x:Name="contentPresenter" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Content="{TemplateBinding Content}" ContentTemplate="{TemplateBinding ContentTemplate}"/>
    											<Rectangle x:Name="FocusVisualElement" Stroke="#FF6DBDD1" StrokeThickness="1" Margin="1" IsHitTestVisible="false" Visibility="Collapsed"/>
    										</Grid>
    									</ControlTemplate>
    								</Setter.Value>
    							</Setter>
    						</Style>
    					</Grid.Resources>
    					<VisualStateManager.VisualStateGroups>
    						<VisualStateGroup x:Name="CommonStates">
    							<VisualState x:Name="Normal"/>
    							<VisualState x:Name="MouseOver"/>
    							<VisualState x:Name="Disabled">
    								<Storyboard>
    									<DoubleAnimationUsingKeyFrames Storyboard.TargetName="DisabledVisualElement" Storyboard.TargetProperty="(UIElement.Opacity)">
    										<SplineDoubleKeyFrame KeyTime="00:00:00" Value=".55"/>
    									</DoubleAnimationUsingKeyFrames>
    								</Storyboard>
    							</VisualState>
    						</VisualStateGroup>
    						<VisualStateGroup x:Name="FocusStates">
    							<VisualState x:Name="Focused">
    								<Storyboard>
    									<DoubleAnimationUsingKeyFrames Storyboard.TargetName="FocusVisualElement" Storyboard.TargetProperty="(UIElement.Opacity)">
    										<SplineDoubleKeyFrame KeyTime="00:00:00" Value="1"/>
    									</DoubleAnimationUsingKeyFrames>
    								</Storyboard>
    							</VisualState>
    							<VisualState x:Name="Unfocused"/>
    							<VisualState x:Name="FocusedDropDown">
    								<Storyboard>
    									<ObjectAnimationUsingKeyFrames Duration="00:00:00" Storyboard.TargetName="PopupBorder" Storyboard.TargetProperty="(UIElement.Visibility)">
    										<DiscreteObjectKeyFrame KeyTime="00:00:00">
    											<DiscreteObjectKeyFrame.Value>
    												<Visibility>Visible</Visibility>
    											</DiscreteObjectKeyFrame.Value>
    										</DiscreteObjectKeyFrame>
    									</ObjectAnimationUsingKeyFrames>
    								</Storyboard>
    							</VisualState>
    						</VisualStateGroup>
    						<VisualStateGroup x:Name="ValidationStates">
    							<VisualState x:Name="Valid"/>
    							<VisualState x:Name="InvalidUnfocused">
    								<Storyboard>
    									<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ValidationErrorElement" Storyboard.TargetProperty="Visibility">
    										<DiscreteObjectKeyFrame KeyTime="0">
    											<DiscreteObjectKeyFrame.Value>
    												<Visibility>Visible</Visibility>
    											</DiscreteObjectKeyFrame.Value>
    										</DiscreteObjectKeyFrame>
    									</ObjectAnimationUsingKeyFrames>
    								</Storyboard>
    							</VisualState>
    							<VisualState x:Name="InvalidFocused">
    								<Storyboard>
    									<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ValidationErrorElement" Storyboard.TargetProperty="Visibility">
    										<DiscreteObjectKeyFrame KeyTime="0">
    											<DiscreteObjectKeyFrame.Value>
    												<Visibility>Visible</Visibility>
    											</DiscreteObjectKeyFrame.Value>
    										</DiscreteObjectKeyFrame>
    									</ObjectAnimationUsingKeyFrames>
    									<ObjectAnimationUsingKeyFrames Storyboard.TargetName="validationTooltip" Storyboard.TargetProperty="IsOpen">
    										<DiscreteObjectKeyFrame KeyTime="0">
    											<DiscreteObjectKeyFrame.Value>
    												<System:Boolean>True</System:Boolean>
    											</DiscreteObjectKeyFrame.Value>
    										</DiscreteObjectKeyFrame>
    									</ObjectAnimationUsingKeyFrames>
    								</Storyboard>
    							</VisualState>
    						</VisualStateGroup>
    					</VisualStateManager.VisualStateGroups>
    					<Border x:Name="ContentPresenterBorder">
    						<Grid>
    							<ToggleButton x:Name="DropDownToggle" HorizontalAlignment="Stretch" Margin="0" Style="{StaticResource comboToggleStyle}" VerticalAlignment="Stretch" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" HorizontalContentAlignment="Right">
    								<Path x:Name="BtnArrow" Stretch="Uniform" Height="4" HorizontalAlignment="Right" Margin="0,0,6,0" Width="8" Data="F1 M 301.14,-189.041L 311.57,-189.041L 306.355,-182.942L 301.14,-189.041 Z ">
    									<Path.Fill>
    										<SolidColorBrush x:Name="BtnArrowColor" Color="#FF333333"/>
    									</Path.Fill>
    								</Path>
    							</ToggleButton>
    							<ContentPresenter x:Name="ContentPresenter" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}">
    								<TextBlock Text=" "/>
    							</ContentPresenter>
    						</Grid>
    					</Border>
    					<Rectangle x:Name="DisabledVisualElement" Fill="White" RadiusX="3" RadiusY="3" IsHitTestVisible="false" Opacity="0"/>
    					<Rectangle x:Name="FocusVisualElement" StrokeThickness="1" Margin="1" IsHitTestVisible="false" Opacity="0" Stroke="#FF6DBDD1"/>
    					<Border x:Name="ValidationErrorElement" Visibility="Collapsed" BorderBrush="#FFDB000C" BorderThickness="1" CornerRadius="1">
    						<ToolTipService.ToolTip>
    							<ToolTip x:Name="validationTooltip" DataContext="{Binding RelativeSource={RelativeSource TemplatedParent}}" Template="{StaticResource ValidationToolTipTemplate}" Placement="Right" PlacementTarget="{Binding RelativeSource={RelativeSource TemplatedParent}}">
    								<ToolTip.Triggers>
    									<EventTrigger RoutedEvent="Canvas.Loaded">
    										<BeginStoryboard>
    											<Storyboard>
    												<ObjectAnimationUsingKeyFrames Storyboard.TargetName="validationTooltip" Storyboard.TargetProperty="IsHitTestVisible">
    													<DiscreteObjectKeyFrame KeyTime="0">
    														<DiscreteObjectKeyFrame.Value>
    															<System:Boolean>true</System:Boolean>
    														</DiscreteObjectKeyFrame.Value>
    													</DiscreteObjectKeyFrame>
    												</ObjectAnimationUsingKeyFrames>
    											</Storyboard>
    										</BeginStoryboard>
    									</EventTrigger>
    								</ToolTip.Triggers>
    							</ToolTip>
    						</ToolTipService.ToolTip>
    						<Grid Height="12" HorizontalAlignment="Right" Margin="1,-4,-4,0" VerticalAlignment="Top" Width="12" Background="Transparent">
    							<Path Fill="#FFDC000C" Margin="1,3,0,0" Data="M 1,0 L6,0 A 2,2 90 0 1 8,2 L8,7 z"/>
    							<Path Fill="#ffffff" Margin="1,3,0,0" Data="M 0,0 L2,0 L 8,6 L8,8"/>
    						</Grid>
    					</Border>
    					<Popup x:Name="Popup">
    						<Border x:Name="PopupBorder" Height="Auto" HorizontalAlignment="Stretch" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="3">
    							<Border.Background>
    								<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
    									<GradientStop Color="#FFFFFFFF" Offset="0"/>
    									<GradientStop Color="#FFFEFEFE" Offset="1"/>
    								</LinearGradientBrush>
    							</Border.Background>
    							<ScrollViewer x:Name="ScrollViewer" BorderThickness="0" Padding="1">
    								<ItemsPresenter/>
    							</ScrollViewer>
    						</Border>
    					</Popup>
    				</Grid>
    			</ControlTemplate>
    		</Setter.Value>
    	</Setter>
    </Style>

    <ControlTemplate x:Key="ValidationToolTipTemplate">
        <Grid x:Name="Root" Margin="5,0" Opacity="0" RenderTransformOrigin="0,0">
            <Grid.RenderTransform>
                <TranslateTransform x:Name="xform" X="-25"/>
            </Grid.RenderTransform>
            <VisualStateManager.VisualStateGroups>
                <VisualStateGroup x:Name="OpenStates">
                    <VisualStateGroup.Transitions>
                        <VisualTransition GeneratedDuration="0"/>
                        <VisualTransition GeneratedDuration="0:0:0.2" To="Open">
                            <Storyboard>
                                <DoubleAnimationUsingKeyFrames Storyboard.TargetName="xform" Storyboard.TargetProperty="X">
                                    <SplineDoubleKeyFrame KeyTime="0:0:0.2" Value="0"/>
                                </DoubleAnimationUsingKeyFrames>
                                <DoubleAnimationUsingKeyFrames Storyboard.TargetName="Root" Storyboard.TargetProperty="Opacity">
                                    <SplineDoubleKeyFrame KeyTime="0:0:0.2" Value="1"/>
                                </DoubleAnimationUsingKeyFrames>
                            </Storyboard>
                        </VisualTransition>
                    </VisualStateGroup.Transitions>
                    <VisualState x:Name="Closed">
                        <Storyboard>
                            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="Root" Storyboard.TargetProperty="Opacity">
                                <SplineDoubleKeyFrame KeyTime="0" Value="0"/>
                            </DoubleAnimationUsingKeyFrames>
                        </Storyboard>
                    </VisualState>
                    <VisualState x:Name="Open">
                        <Storyboard>
                            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="xform" Storyboard.TargetProperty="X">
                                <SplineDoubleKeyFrame KeyTime="0" Value="0"/>
                            </DoubleAnimationUsingKeyFrames>
                            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="Root" Storyboard.TargetProperty="Opacity">
                                <SplineDoubleKeyFrame KeyTime="0" Value="1"/>
                            </DoubleAnimationUsingKeyFrames>
                        </Storyboard>
                    </VisualState>
                </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <Border Margin="4,4,-4,-4" Background="#052A2E31" CornerRadius="5"/>
            <Border Margin="3,3,-3,-3" Background="#152A2E31" CornerRadius="4"/>
            <Border Margin="2,2,-2,-2" Background="#252A2E31" CornerRadius="3"/>
            <Border Margin="1,1,-1,-1" Background="#352A2E31" CornerRadius="2"/>
            <Border Background="#FFDC000C" CornerRadius="2"/>
            <Border CornerRadius="2">
                <TextBlock Margin="8,4,8,4" MaxWidth="250" UseLayoutRounding="false" Foreground="White" Text="{Binding (Validation.Errors)[0].ErrorContent}" TextWrapping="Wrap"/>
            </Border>
        </Grid>
    </ControlTemplate>

</ResourceDictionary>